;;; This file enforces consistency in the visual style:
;;; - doc, here-doc, comments, strings are in the same taint.
;;; - search highlight, search lazy follow the same color code.
;;; - diffs (ediff, smerge, etc.) follow the same color code.

;;; To find the variable associated to a currently used color, place the cursor
;;; on it and call `describe-face'. Or browse the `list-faces-display'.

;;; General
;; (set-face-attribute 'default nil :foreground "white" :background "black")
(set-face-attribute 'default nil :foreground "white smoke" :background "#101010")
(set-face-background 'mouse "#777777")  ; Darker mouse, less distracting.

;;; Line numbers.
;;; Graphic version has a gray bar separating text from line
;;; numbers, so we can leave the background black.
(if (display-graphic-p)
    (set-face-background 'shadow "black")
  (set-face-background 'shadow "#1c1c1c"))

;;; Ediff
(with-eval-after-load 'ediff-init
  (set-face-attribute 'ediff-even-diff-A nil :inherit 'ediff-current-diff-A :foreground 'unspecified :background 'unspecified :box nil)
  (set-face-attribute 'ediff-odd-diff-A nil :inherit 'ediff-current-diff-A :foreground 'unspecified :background 'unspecified :box nil)
  (set-face-attribute 'ediff-even-diff-B nil :inherit 'ediff-current-diff-B :foreground 'unspecified :background 'unspecified :box nil)
  (set-face-attribute 'ediff-odd-diff-B nil :inherit 'ediff-current-diff-B :foreground 'unspecified :background 'unspecified :box nil)
  (set-face-attribute 'ediff-even-diff-C nil :inherit 'ediff-current-diff-C :foreground 'unspecified :background 'unspecified :box nil)
  (set-face-attribute 'ediff-odd-diff-C nil :inherit 'ediff-current-diff-C :foreground 'unspecified :background 'unspecified :box nil)
  (set-face-attribute 'ediff-current-diff-A nil :box "white")
  (set-face-attribute 'ediff-current-diff-B nil :box "white")
  (set-face-attribute 'ediff-current-diff-C nil :box "white"))

;;; Outline mode
(with-eval-after-load 'outline
  ;; (set-face-attribute 'outline-1 nil :inherit 'font-lock-warning-face)
  (set-face-attribute 'outline-1 nil :weight 'bold :foreground "#CBAC42")
  (set-face-attribute 'outline-2 nil :weight 'bold :foreground "#7BBF11")
  (set-face-attribute 'outline-3 nil :weight 'bold :foreground "#BC684F")
  (set-face-attribute 'outline-4 nil :weight 'bold :foreground "#4C95BF")
  (set-face-attribute 'outline-5 nil :weight 'bold :foreground "SeaGreen")
  (set-face-attribute 'outline-6 nil :weight 'bold :foreground "DarkSlateGray4")
  (set-face-attribute 'outline-7 nil :weight 'bold :foreground "DarkSlateBlue")
  (set-face-attribute 'outline-8 nil :weight 'bold :foreground "Gold"))

;;; show-paren
(with-eval-after-load 'paren
  ;; (set-face-background 'show-paren-match-face (face-background 'default)) ; Disable background color.
  (set-face-background 'show-paren-match "#555555")
  (set-face-foreground 'show-paren-match "#def")
  (set-face-attribute 'show-paren-match nil :weight 'extra-bold))

;; Helm
(with-eval-after-load 'helm
  (set-face-attribute 'helm-source-header nil :inherit 'header-line :height 'unspecified :background 'unspecified :foreground 'unspecified)
  (set-face-background 'helm-selection "#4f4f4f")
  (set-face-background 'helm-visible-mark "#2f2f2f")
  (set-face-foreground 'helm-visible-mark nil)
  (set-face-foreground 'helm-match "red")
  (set-face-attribute 'helm-buffer-file nil :background 'unspecified :foreground "white" :weight 'normal)
  (set-face-attribute 'helm-buffer-directory nil :background 'unspecified :foreground "#1e90ff" :weight 'bold)
  (set-face-attribute 'helm-ff-directory nil :background 'unspecified :foreground 'unspecified :weight 'unspecified :inherit 'helm-buffer-directory)
  (set-face-attribute 'helm-ff-file nil :background 'unspecified :foreground 'unspecified :weight 'unspecified :inherit 'helm-buffer-file)
  (set-face-foreground 'helm-grep-finish "#00AA00"))

;; Spaceline
(require 'spaceline-config)
(spaceline-emacs-theme)

(provide 'theme-rx)
